from include.fenshu import *
def calctest1(string: str)->str:
    
    # string = input()
    # noneState=-1
    left = 0
    right = 1
    kuohao_state=right
    tmp_num = ""
    calculators = ["+","-","*"]
    li=[]

    for calculator in calculators:
        li = string.split(calculator)
        assert len(li)<=2
        if len(li)==2:
            return calc(fenshu(li[0]), fenshu(li[1]), calculator).toDieString()
    for i, element in enumerate(string):
        if element=='(':
            kuohao_state = left
        if element==')':
            kuohao_state = right
        if element=='/':
            if kuohao_state==right:
                li = [string[:i], string[i+1:]]
                return calc(fenshu(li[0]), fenshu(li[1]), '/').toDieString()


if __name__ == '__main__':
    string = "1/(2/3)"
    result = calctest1(string)
    print(result)
